package com.example.block_chain.common;

import lombok.Getter;

@Getter
public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    SYSTEM_ERROR(500, "出现错误"),
    USERNAME_EXIST(501, "用户名已存在"),
    USERNAME_NOT_NULL(509, "用户名不能为空"),
    PASSWORD_NOT_NULL(510, "密码不能为空"),

    USERNAME_NOT_EXIST(511, "用户不存在"),
    FILE_TYPE_ERROR(507, "仅支持jpg或png图片"),
    CODE_EXISTS(512, "code已经存在"),
    STUDENT_NOT_FOUND(502, "学生不存在"),
    AWARD_EXISTS(513, "奖项已存在"),
    AWARD_NO_EXISTS(514, "奖项不存在"),
    AUTHORITY_DEFICIENCY(515, "权限不足"),
    SCHOOL_NO_EXISTS(516, "学校不存在"),
    FACULTY_NO_EXISTS(517, "学院不存在"),
    SCHOOL_EXISTS(518, "学校已经存在");
    final int code;
    final String msg;

    AppHttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

}